// JavaScript Document
   var mottos = $.makeArray();
    $.ajax({
        type: "GET",
        url: "Data/Mottos.xml",
        dataType: "xml",
        success: parseXml
    });
    function parseXml(xml) {
        $(xml).find("Mottos").each(function () {
            $(this).find("Motto").each(function (i) {
                var b = $.makeArray();
                b[0] = $(this).attr("id");
                b[1] = $(this).find("Title").text();
                b[2] = $(this).find("Date").text();
                mottos[i] = b;
            });
        });
    }


    $(document).ready(function () {
        viewEmail();

        var i = Math.floor(Math.random() * mottos.length);
        var b = $.makeArray(mottos[i]);
        $("#view-mottos").append(b[1].toString());
        window.setInterval(function () {
            var i = Math.floor(Math.random() * mottos.length);
            var b = $.makeArray(mottos[i]);
            $("#view-mottos").empty();
            $("#view-mottos").append(b[1].toString());
        }, 5000);
	
	
	   $(".topmenu_jpg")
        .mouseover(function() { 
            var src = $(this).attr("src").match(/[^\.]+/) + "_over.png";
            $(this).attr("src", src);
        })
        .mouseout(function() {
            var src = $(this).attr("src").replace("_over", "");
            $(this).attr("src", src);
        });
	<!--color box -->
	$(".group1").colorbox({rel:'group1'});
	$(".group2").colorbox({rel:'group2'});
	$(".group3").colorbox({rel:'group3'});
	<!--gotop -->
	$().UItoTop({ easingType: 'easeOutQuart' });
	
    });


   function viewEmail() {
        if ($('input#email-for-news').attr('value') == '')
            $('input#email-for-news').attr('value', 'Your Email address...');
        $('input#email-for-news').focus(function () {
            if ($(this).attr('value') == 'Your Email address...')
                $(this).attr('value', '');
        });
        $('input#email-for-news').blur(function () {
            if ($(this).attr('value') == '')
                $(this).attr('value', 'Your Email address...');
        });
        $('a.footer-link').mouseover(function () {
            $(this).attr('color', '#E41A40');
        });
        $('a.footer-link').mouseout(function () {
            $(this).attr('color', '#CCC');
        });
    }
	
	